setwd("E:/0 公共数据库差异情况/db_for_5hmc/IMPC")
library(clusterProfiler)
impc=read.table("impc_term_id_termName_markerid_symbol.txt",head=T,sep="\t")
impc$symbol=toupper(impc$symbol) ###转化成大写
case=read.table("E:/5hmc_file/2_5hmc_yjp_bam/ASM/bayes_p/bias_AShM_BF_no_motif.txt",head=T,sep="\t")
case=case[case$BF_in_DC>10,]
case=tidyr::separate_rows(case,Gene.refGene,sep=";")
case_symbol=case$Gene.refGene

anno=impc[,c(3,4)]
anno=anno[!duplicated(anno$gene),]
case_symid=anno[anno$symbol %in% case_symbol,]$gene
term2go=impc[,c(1,3)]
df=enricher(gene=case_symid,pvalueCutoff = 1,TERM2GENE = term2go)
